package edu.zut.cs.software.perfect.process.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.fasterxml.jackson.annotation.JsonIgnore;

import edu.zut.cs.software.perfect.base.domain.BaseEntity;

/**
 * @ClassName courseProcess
 * @Description TODO
 * @Author niu-xi
 * @Date 2020年4月7日
 * @Version 1.0
 */

@Entity
@Table(name="T_COURSEPROCESS")
public class CourseProcess extends BaseEntity<Long> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3264329410614297041L;
    
	/**
	 * classId for CourseProcess
	 */
	@Column
	String classId;
	
	/**
	 * courseNumber for CourseProcess
	 */
	@Column
	String courseNumber;
	
	/**
	 * courseName for CourseProcess
	 */
	@Column
	String courseName;
	
	/**
	 * teacher for CourseProcess
	 */
	@Column
	String teacher;
	
	/**
	 * classTime for CourseProcess
	 */
	@Column
	String classTime;
	
	/**
	 * classPlace for CourseProcess
	 */
    @Column
	String classPlace;
    
    
    /**
	 * Many CourseProcess objects relate to one ProcessRegistrar.
	 */
	@ManyToOne
	@JoinColumn(name = "PROCESS_REGISTRAR_ID")
	@JsonIgnore
	ProcessRegistrar processRegistrar;

	public ProcessRegistrar getProcessRegistrar() {
		return processRegistrar;
	}

	public void setProcessRegistrar(ProcessRegistrar processRegistrar) {
		this.processRegistrar = processRegistrar;
	}

	public String getClassId() {
		return classId;
	}

	public void setClassId(String classId) {
		this.classId = classId;
	}

	public String getCourseNumber() {
		return courseNumber;
	}

	public void setCourseNumber(String courseNumber) {
		this.courseNumber = courseNumber;
	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public String getTeacher() {
		return teacher;
	}

	public void setTeacher(String teacher) {
		this.teacher = teacher;
	}

	public String getClassTime() {
		return classTime;
	}

	public void setClassTime(String classTime) {
		this.classTime = classTime;
	}

	public String getClassPlace() {
		return classPlace;
	}

	public void setClassPlace(String classPlace) {
		this.classPlace = classPlace;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	@Override
	public boolean equals(Object obj) {
		return EqualsBuilder.reflectionEquals(this, obj);
	}

	@Override
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}

}
